
import java.util.ArrayList;

/*
	Author: Ross Clement
    Statistics
	Holds all of the statistics for a Player
*/

class Statistics{
			//Variables we will need to hold all the stats goodness
	        int gamestotal;
	        int wins;
	        int losses;
                int draws;
	        int finished;
	        int unfinished;
	        int movestotal;
	        int warps;
	        int jumps;
	        int kingscreated;
                int kingsdestroyed;

			//Constructor that intializes all stats to 0
            Statistics()
            {
            gamestotal=0;
            wins=0;
            losses=0;
            draws=0;
            finished=0;
            unfinished=0;
            movestotal=0;
            warps=0;
            jumps=0;
            kingscreated=0;
            kingsdestroyed=0;
			}


			//setStat sets the requested statistic to the requested amount
			void setStat(String stat, int newVal)
			{
				//Checks to see if the supplied string arg matches a statistical category;
				//If so, sets that stat category to the supplied int argument
				if(stat.equals("gamestotal"))
					{
						gamestotal = newVal;
					}
				else if(stat.equals("wins"))
					{
						wins = newVal;
					}
				else if(stat.equals("losses"))
					{
						losses = newVal;
					}
				else if(stat.equals("finished"))
					{
						finished = newVal;
					}
				else if(stat.equals("unfinished"))
					{
						unfinished = newVal;
					}
				else if(stat.equals("movestotal"))
					{
						movestotal = newVal;
					}
				else if(stat.equals("warps"))
					{
						warps = newVal;
					}
				else if(stat.equals("jumps"))
					{
						jumps = newVal;
					}
				else if(stat.equals("kingscreated"))
					{
						kingscreated = newVal;
					}
				else if(stat.equals("kingsdestroyed"))
					{
						kingsdestroyed = newVal;
					}
				}


        // returns stats in an arraylist of Integers
        ArrayList<Integer> getStats() {
            ArrayList<Integer> stats = new ArrayList();
            stats.add(gamestotal);
            stats.add(wins);
            stats.add(losses);
            stats.add(draws);
            stats.add(finished);
            stats.add(unfinished);
            stats.add(movestotal);
            stats.add(warps);
            stats.add(jumps);
            stats.add(kingscreated);
            stats.add(kingsdestroyed);

            return stats;
       }
}